<script setup lang="ts">
let route=useRoute()
let date=new Date(route.query.time as string);
let quickConfirm=route.query.quickConfirm;
function back(){
  history.back()
}
</script>

<template>
  <div class="info">
    <h2 style="color: green;text-align: center;margin: 11px 0;">乘客端 - 行程详情</h2>
    <p>出发地：{{route.query.from}}</p>
    <p>目的地：{{route.query.to}}</p>
    <p>出发时间：{{date.getFullYear()}}年{{date.getMonth()+1}}月{{date.getDate()}}日 {{date.getHours().toString().padStart(2,'0')}}:{{date.getMinutes().toString().padStart(2,'0')}}</p>
    <p style="color: seagreen" v-if="quickConfirm==='1' ">【快速确认】</p>
    <p>
      状态：已下车
    </p>
    <van-button class="bt" @click="back">我知道了！</van-button>
  </div>
</template>

<style scoped>
.info{
  border-radius: 12px;
  background-color: RGB(227,231,228);
  padding: 14px;
  border: 1px solid gray;
  width: 80%;
  margin: 20px auto;
}
.bt{
  position: relative;
  left: 60%;
}
</style>